<?php



$titulo = "test jquery";

// CAMBIADO DESDE AFUERA ARREGLADO
// SDFASDFASDFASDF


?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $titulo; ?></title>

	
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	font-family: helvetica, arial;
	font-size:12px;
}

.error {
	background-color:#FFFF33;
}

.input {
	border:none;
}

#form_usuario {
	background-color:#EAEAFC;
	width:400px;
	margin-top:50px;
	margin-left:50px;
	padding:20px;
}

#form_usuario_msg {
	width:400px;
	text-align:left;
}

#form_suscribirse {
	background-color:#EAEAAA;
	width:400px;
	margin-top:50px;
	margin-left:50px;
	padding:20px;
}

#form_suscribirse_msg {
	width:400px;
	text-align:left;
}

-->
</style>

<script type="text/javascript" language="javascript" src="js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery-ui.js"></script>
<script type="text/javascript" language="javascript" src="dmcForm/client.js"></script>
<script type="text/javascript" language="javascript" src="dmcForm/controls/textbox/client.js"></script>

<!-- <link type="text/css" rel="stylesheet" media="screen" href="css/layout.css" /> -->

<script type="text/javascript">
	
	$(function() {

	    $('#form_usuario').form({
			url: "_procesa.php",
			isAjax: true,
			submitButton: "form_usuario_submit",
			msgContainer: "form_usuario_msg",
			msgItemTagOpen: "<p>",
			msgItemTagClose: "</p>",
			preloaderHtml: "<img src='img/preloader6.gif' alt='loading..' />",
			controls: [
						{id: "nombre", kind:"textbox"},
						{id: "apellido", kind:"textbox"},
						{id: "email", kind:"textbox"},
						{id: "edad", kind:"textbox"},
						{id: "comentario", kind:"textbox"}
						],
			refreshOnComplete: false
		});	 		

	

	    $('#nombre').textbox({
			required: true,
			requiredMsg: "debe completar el nombre",
			errorClass: "error",		    
	    	validation: []
		});	

	    $('#apellido').textbox({
			required: true,
			requiredMsg: "debe completar el apellido",
			errorClass: "error",		    
	    	validation: []
		});			

	    $('#email').textbox({
			required: true,
			requiredMsg: "debe completar el email",
			errorClass: "error",
			validation: [
						{errorMsg: "el email debe ser válido", regEx: /^[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*@[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*[\.]{1}[a-z]{2,6}$/},
						{errorMsg: "el email debe incluir @ovi.com", regEx: /ovi.com$/}
						]
		});		
		
	    $('#edad').textbox({
				required: true,
				requiredMsg: "debe completar la edad",
				errorClass: "error",		    
		    	validation: [
		    			    {errorMsg: "la edad debe ser sólo de uno a 3 números", regEx: /^[0-9]{0,3}$/}
		    			    ]
		});	

	    $('#comentario').textbox({
				required:false, 
				requiredMsg: "debe completar el comentario", 
				errorClass:"error", 
				validation: [
							{errorMsg: "al menos debe poner algo en el texto", regEx: /algo/}
							]
		});	





	    $('#form_suscribirse').form({
			url: "_procesa.php",
			isAjax: true,
			submitButton: "form_suscribirse_submit",
			msgContainer: "form_suscribirse_msg",
			msgItemTagOpen: "<p>",
			msgItemTagClose: "</p>",
			preloaderHtml: "<img src='img/preloader5.gif' alt='loading..' />",
			controls: [
						{id: "email_sus", kind:"textbox"},
						]
		});	

	    $('#email_sus').textbox({
			required: true,
			requiredMsg: "debe completar el email",
			errorClass: "error",
			validation: [
						{errorMsg: "el email debe ser válido", regEx: /^[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*@[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*[\.]{1}[a-z]{2,6}$/}
						]
		});	
	    
		
	});

</script>

</head>


<body>



	<div id='form_usuario' class=''>
		<div id='form_usuario_msg' class=''></div>
		<br /><br />
		Nombre
		<input type='text' id='nombre' name='nombre' value='' class='input'/>
		<br /><br />
		Apellido
		<input type='text' id='apellido' name='apellido' value='' class='input'/>	
		<br /><br />
		Email
		<input type='text' id='email' name='email' value='' class='input'/>	
		<br /><br />
		Edad
		<input type='text' id='edad' name='edad' value='' class='input'/>	
		<br /><br />
		Comentario
		<textarea id='comentario' name='comentario' class='input' rows="2" cols="20"></textarea>
		<br /><br />
		<input type='button' id='form_usuario_submit' name='form_usuario_submit' value='Enviar' class='button'/>	
	</div>
	
	
	
	
	<div id='form_suscribirse' class=''>
		<div id='form_suscribirse_msg' class=''></div>
		<br /><br />
		Email
		<input type='text' id='email_sus' name='email_sus' value='' class='input'/>	
		<br /><br />
		<input type='button' id='form_suscribirse_submit' name='form_suscribirse_submit' value='Enviar' class='button'/>	
	</div>	
		
		
	

		
	<br />
	<br />
	<br />
	CAMBIADO
	
	
	ASDFASDF
	ultimo
	


</body>

</html>
